<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>  
<!DOCTYPE html>
<%@ include file="/WEB-INF/views/include/bootstrap-table.jsp"%>

   <form id="searchForm"  class="form-search">
				<div class="search-bar">
					<ul class="clearfix">
						<li>
							<span>登录名：</span>
							<input id="loginName" name="loginName" class="form-control bootstrap-table-input"/>
						</li>
						<li>
							<span>姓名：</span>
							<input id="name" name="name" class="form-control bootstrap-table-input"/>
						</li>
					</ul>
					<div id="btn_search" class="search-btn">查询</div>
					<script type="text/javascript">
						$(function(){
							$(".search-bar ul li").each(function(){
								var spanWidth = $(this).find("span").width();
								$(this).find(".form-control").width(230-20-spanWidth);	
								$(this).children(".input-append").find(".required").width(230-20-36+1-spanWidth);	
								var barHeight = $(".search-bar").height();
								$(".search-btn").css("line-height", barHeight+"px");
							});
						})
					</script>
				</div>
				
				<div id="toolbar">                                  
					<!-- <button type="button" class="btn-custom" onclick="openManyWindow('bas/unit/unitForm','新增',1000,600,'10px',false,'unitFormWin')">新增</button>
					<button type="button" class="btn-custom btndelete" onclick="batchDelete('bas/unit/batchDelete')">批量删除</button>
					<button type="button" class="btn-custom" onclick="exportData('${ctx}/bas/unit/export',this)">导出</button>  -->
				</div>
			</form>
	
	<!-- entityCode=ZH05-SDG-01-00-12-00-1403&entityName=你好  中文会出现乱码 -->
	<!-- entityCode=ZH05-SDG-01-00-12-00-1403&entityName=你好  中文会出现乱码 -->
	<table id="table" 
	    data-toggle="table" 
	    data-url="${ctx}/sys/user/userBydialogJson?${param.params}"
	         data-toolbar="#toolbar"
		     data-height="${dataHeight306}" 
		     data-maintain-selected="true" 
		     data-side-pagination="server"
		     data-click-to-select="true" 
		     data-pagination="true" 
		     data-single-select="${param.singleSelect}"
		     data-id-field="id"
		     data-query-params="doQuery"
		     data-cache="false"
		     data-show-columns="true"
		     data-page-size="5"
		    data-page-list="${dataPageList}" >
		<thead>
			<tr>
				<th data-checkbox="true"></th>
				<th data-field="loginName">登录名</th>
				<th data-field="name">姓名</th>
				<th data-field="office.name">归属部门</th>
				<th data-field="company.name">归属公司</th>
			</tr>
		</thead>
	</table>

<script type="text/javascript">
		$(function () { 
		    $("#btn_search").click(function () { 
		            $table.bootstrapTable('refresh'); 
		     }); 
		 }); 
		
		function doQuery(params) {
			var loginName_value = $("#loginName").val();
			var name_value = $("#name").val();
			
			if(loginName_value != null || loginName_value !=''){
				params.loginName = loginName_value;
			}
			if(name_value != null || name_value !=''){
				params.name = name_value;
			}
			
		  return params;
		}
	</script>
	
	<jsp:include page="/WEB-INF/views/include/pageJs.jsp" />
	
	